<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <home-page></home-page>
  </div>
  <script src="./vue.global.js"></script>
  <script src="./axios.js"></script>
  <script>
    const { createApp, h } = Vue;
    const app = createApp();
    const HomePage = {
      template:`
        <div>
          <h2>home页</h2>  
          <ul>
            <li>
              <h4>
                
              </h4>
              <img />  
            </li>  
          </ul>
        </div>
      `,
      data() {
        return {
          arts: []
        }
      },
      methods: {
        fetchArts(){
          axios.post('https://api.it120.cc/conner/cms/news/list/v2', {
            page: 1,
            pageSize: 10
          },{
            headers: {
              token: 'aert-werty-wertyui'
            }
          }).then(res => {
            console.log(res);
          })
        }
      },
      created () {
        this.fetchArts();
      },
    }
    app.component('HomePage', HomePage);
    app.mount('#app')
  </script>
</body>
</html>